<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>库存管理</title>
</head>
<body class="hold-transition skin-black sidebar-mini">
<div th:replace="common/fragment :: link"></div>
<div class="wrapper">
    <div th:replace="common/fragment :: navbar"></div>
    <div th:replace="common/fragment :: menu"></div>
    <div class="content-wrapper">
        <section class="content-header">
            <h1>库存管理</h1>
        </section>
        <section class="content">
            <div class="box">
                <!--高级查询--->
                <div style="margin: 10px;">
                    <a class="btn btn-success btn-input" href="/warehouse/input">
                        <span class="glyphicon glyphicon-plus"></span> 添加
                    </a>
                    </form>
                </div>
                <div class="box-body table-responsive ">
                    <table class="table table-hover table-bordered table-striped">
                        <thead>
                        <tr>
                            <th>编号</th>
                            <th>地址</th>
                            <th>电话</th>
                            <th>商品</th>
                            <th>数量</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="warehouse,stat:${pageInfo.list}">

                            <td th:text="${stat.count}">1</td>
                            <td th:text="${warehouse.address}">天津</td>
                            <td th:text="${warehouse.tel}">99-121-12</td>
                            <td th:text="${warehouse.goods?.name}">手机</td>
                            <td th:text="${warehouse.num}">9999</td>
                            <td>
                                  <span th:if="${warehouse.status}">
                                       上线
								  </span>
                                <span th:unless="${warehouse.status}">
                                       下线
									</span>
                            </td>
                            <td>
                                <a class="btn btn-info btn-xs btn_redirect btn-input"  th:href="|/warehouse/input?id=${warehouse.id}|">
                                    <span class="glyphicon glyphicon-pencil"></span> 编辑
                                </a>
                                <a class="btn btn-danger btn-xs btn-delete"
                                   th:data-url="'/warehouse/delete?id='+${warehouse.id}">
                                    <span class="glyphicon glyphicon-trash"></span> 删除
                                </a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <div th:replace="common/fragment :: page"></div>
                </div>
            </div>
        </section>
    </div>
    <div th:replace="common/fragment :: footer"></div>
</div>

</body>
</html>